/*
 * mhstringhashmap.h
 *
 *  Created on: 2010-7-14
 *      Author: angelstone
 */

#pragma once

#include <stdlib.h>
#include <string.h>

namespace mediahouse {
	class wxStringEqualNoCase {
	public:
		wxStringEqualNoCase() {
		}
		bool operator()(const wxString& a, const wxString& b) const {
			return a.CmpNoCase(b) == 0;
		}
		bool operator()(const wxChar* a, const wxChar* b) const {
			return wxStricmp(a, b) == 0;
		}
#if wxUSE_UNICODE
		bool operator()(const char* a, const char* b) const {
#ifdef _WIN32
			return stricmp(a, b) == 0;
#else
			return strcasecmp(a, b) == 0;
#endif
		}
#endif // wxUSE_UNICODE
		wxStringEqualNoCase& operator=(const wxStringEqualNoCase&) {
			return *this;
		}
	};

	WX_DECLARE_HASH_MAP(wxString, wxString, wxStringHash, wxStringEqualNoCase, wxHashmapStr2StrNoCase);
	WX_DECLARE_HASH_MAP(wxString, wxString, wxStringHash, wxStringEqual, wxHashmapStr2Str);
}
